<?php
	class ChapterAction extends CommonAction{

		//修改内容信息
		public function edit(){
			
			
			$C=D('Dir');
			import('ORG.UTIL.Page');
		
			$contents=$C->order('id desc')->select();
				
			
			$this->assign('contents',$contents);
				
			$this->display();
		
			
			
		}
		public function editaction(){
			
			
			$C=D('Dir');
			import('ORG.UTIL.Page');
			$data['txt_dir']=$_POST['txt_dir'];
			$data['img_dir']=$_POST['img_dir'];
			$return=$C->where("id=1")->save($data); 
			if($return==1){
				 $this->success('更改成功', 'edit');
			}else{
				 $this->error('更改失败');
			}
			
		}
		
	}

?>